package com.cxhc.system.service.app.impl;

import java.util.List;

import com.cxhc.system.domain.app.SysUserEnterprise;
import com.cxhc.system.mapper.app.SysUserEnterpriseMapper;
import com.cxhc.system.service.app.ISysUserEnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户角色企业Service业务层处理
 * 
 * @author Dhq
 * @date 2024-08-14
 */
@Service
public class SysUserEnterpriseServiceImpl implements ISysUserEnterpriseService
{
    @Autowired
    private SysUserEnterpriseMapper sysUserEnterpriseMapper;

    /**
     * 查询用户角色企业
     * 
     * @param ID 用户角色企业主键
     * @return 用户角色企业
     */
    @Override
    public SysUserEnterprise selectSysUserEnterpriseByID(Long ID)
    {
        return sysUserEnterpriseMapper.selectSysUserEnterpriseByID(ID);
    }

    @Override
    public SysUserEnterprise selectSysUserEnterpriseByUserId(Long userId)
    {
        return sysUserEnterpriseMapper.selectSysUserEnterpriseByUserId(userId);
    }

    /**
     * 查询用户角色企业列表
     * 
     * @param sysUserEnterprise 用户角色企业
     * @return 用户角色企业
     */
    @Override
    public List<SysUserEnterprise> selectSysUserEnterpriseList(SysUserEnterprise sysUserEnterprise)
    {
        return sysUserEnterpriseMapper.selectSysUserEnterpriseList(sysUserEnterprise);
    }

    /**
     * 新增用户角色企业
     * 
     * @param sysUserEnterprise 用户角色企业
     * @return 结果
     */
    @Override
    public int insertSysUserEnterprise(SysUserEnterprise sysUserEnterprise)
    {
        return sysUserEnterpriseMapper.insertSysUserEnterprise(sysUserEnterprise);
    }

    /**
     * 修改用户角色企业
     * 
     * @param sysUserEnterprise 用户角色企业
     * @return 结果
     */
    @Override
    public int updateSysUserEnterprise(SysUserEnterprise sysUserEnterprise)
    {
        return sysUserEnterpriseMapper.updateSysUserEnterprise(sysUserEnterprise);
    }

    /**
     * 批量删除用户角色企业
     * 
     * @param IDs 需要删除的用户角色企业主键
     * @return 结果
     */
    @Override
    public int deleteSysUserEnterpriseByIDs(Long[] IDs)
    {
        return sysUserEnterpriseMapper.deleteSysUserEnterpriseByIDs(IDs);
    }

    /**
     * 删除用户角色企业信息
     * 
     * @param ID 用户角色企业主键
     * @return 结果
     */
    @Override
    public int deleteSysUserEnterpriseByID(Long ID)
    {
        return sysUserEnterpriseMapper.deleteSysUserEnterpriseByID(ID);
    }
}
